<?php $elements = $menu->getElements(); ?>
<ul>
    <?php foreach($elements as $index => $element): ?>
    <li><a <?php echo $element->isActive() ? 'class="active"' : ''; ?> href="<?php echo $element->getLink() ?>"><?php echo $element->getName() ?></a>
	<?php if($element->hasChildren()): ?>
	    <ul>
	    <?php foreach($element->getSubElements() as $child): ?>
		<li><a <?php echo $child->isActive() ? 'class="active"' : ''; ?> href="<?php echo $child->getLink() ?>"><?php echo $child->getName() ?></a></li>
	    <?php endforeach; ?>
	    </ul>
	<?php endif ?>
    </li>
    <?php endforeach; ?>
</ul>
